package com.gzsxy.esjy.sign.dto;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author zhangxiaolong
 * @since 2022/7/15
 */
@Getter
@Setter
@NoArgsConstructor
public class AndroidSignProtocolDto extends BaseSignProtocolDto implements Serializable {
    private String p_version;
    private String p_type;
    private String p_cmd;
    private Integer p_sn;

    @JSONField(serialize = false)
    private AndroidSignMsgDto msgDto;
    private String p_msg;

    public AndroidSignProtocolDto(Integer pSn, AndroidSignMsgDto msg) {
        this.p_version = "1.0.0";
        this.p_type = "request";
        this.p_cmd = "p_translate";
        this.p_sn = pSn;
        this.p_msg = JSON.toJSONString(msg);
        this.msgDto = msg;
    }
}
